﻿using D3D = Microsoft.DirectX.Direct3D;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using Microsoft.DirectX.Direct3D;

namespace SimpleLiteForm.Text
{
    /// <summary>
    /// Helper class for global access to fonts.
    /// </summary>
    public static class FontHelper
    {
        /// <summary>
        /// The font with the very small size.
        /// </summary>
        public static D3D.Font TextVerySmall;

        /// <summary>
        /// The font with the small size.
        /// </summary>
        public static D3D.Font TextSmall;

        /// <summary>
        /// The font with the normal size.
        /// </summary>
        public static D3D.Font TextNormal;

        /// <summary>
        /// The font with the large size.
        /// </summary>
        public static D3D.Font TextLarge;

        /// <summary>
        /// The font with the main title size.
        /// </summary>
        public static D3D.Font TextTitle1;

        /// <summary>
        /// The font with the second title size.
        /// </summary>
        public static D3D.Font TextTitle2;

        /// <summary>
        /// Initializes the fonts.
        /// </summary>
        /// <param name="device">The graphics device.</param>
        public static void Initialize(Device device)
        {
            System.Drawing.Font verySmall = new System.Drawing.Font("Arial", 10f, FontStyle.Regular);
            TextVerySmall = new D3D.Font(device, verySmall);

            System.Drawing.Font small = new System.Drawing.Font("Arial", 12f, FontStyle.Regular);
            TextSmall = new D3D.Font(device, small);

            System.Drawing.Font normal = new System.Drawing.Font("Arial", 16f, FontStyle.Regular);
            TextNormal = new D3D.Font(device, small);

            System.Drawing.Font large = new System.Drawing.Font("Arial", 20f, FontStyle.Regular);
            TextNormal = new D3D.Font(device, large);

            System.Drawing.Font title1 = new System.Drawing.Font("Arial", 20f, FontStyle.Bold);
            TextTitle1 = new D3D.Font(device, title1);

            System.Drawing.Font title2 = new System.Drawing.Font("Arial", 16f, FontStyle.Bold);
            TextTitle2 = new D3D.Font(device, title2);
        }
    }
}
